<?php
// cookies are stored on the user computer!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

// setcookie($name, $value, $expire, $path, $domain, $secure, $httponly)
// $name - cookie name
// $value - cookie value
// $expire - time till cookie expired (sec)

// time();  get the current time


if(!isset($_COOKIE['username']))
{
	setcookie('username', 'MyCookie', time() + 60);
	header("Location: ../index.php");
}
else
{
	echo 'Cookie is already in Cookied :D';
}

